package com.teamall.web.sys.db.arg;

import java.util.*;
import java.math.*;
import org.apache.commons.lang.*;

public class SysUserTokenArg {
    private String pk_name = "ID";

    private String orderByClause;

    private String groupByClause;

    private String columns;

    private String countsql1;

    private String countsql2;

    private boolean distinct;

    private int rowStart = 0;

    private int rowEnd = 10;

    private List<SysUserTokenCriteria> oredCriteria;

    public SysUserTokenArg() {
        oredCriteria = new ArrayList<SysUserTokenCriteria>();
    }

    public void setPk_name(String pk_name) {
        this.pk_name = StringEscapeUtils.escapeSql(pk_name);
    }

    public String getPk_name() {
        return pk_name;
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = StringEscapeUtils.escapeSql(orderByClause);
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setGroupByClause(String groupByClause) {
        this.groupByClause = StringEscapeUtils.escapeSql(groupByClause);
    }

    public String geGroupByClause() {
        return groupByClause;
    }

    public void setColumns(String columns) {
        this.columns = StringEscapeUtils.escapeSql(columns);
    }

    public String geColumns() {
        return columns;
    }

    public void setCountsql1(String countsql1) {
        this.countsql1 = StringEscapeUtils.escapeSql(countsql1);
    }

    public String geCountsql1() {
        return countsql1;
    }

    public void setCountsql2(String countsql2) {
        this.countsql2 = StringEscapeUtils.escapeSql(countsql2);
    }

    public String geCountsql2() {
        return countsql2;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public void setRowStart(int rowStart) {
        this.rowStart = rowStart;
    }

    public void setRowEnd(int rowEnd) {
        this.rowEnd = rowEnd;
    }

    public int getRowStart() {
        return rowStart;
    }

    public int getRowEnd() {
        return rowEnd;
    }

    public List<SysUserTokenCriteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(SysUserTokenCriteria criteria) {
        oredCriteria.add(criteria);
    }

    public SysUserTokenCriteria or() {
    	SysUserTokenCriteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public SysUserTokenCriteria createCriteria() {
    	SysUserTokenCriteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected SysUserTokenCriteria createCriteriaInternal() {
    	SysUserTokenCriteria criteria = new SysUserTokenCriteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        groupByClause = null;
        columns = null;
        countsql1 = null;
        countsql2 = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<SysUserTokenCriterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<SysUserTokenCriterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<SysUserTokenCriterion> getAllCriteria() {
            return criteria;
        }

        public List<SysUserTokenCriterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new SysUserTokenCriterion(condition));
        }

        protected void addCriterion(String condition, Object value,
                String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property
                        + " cannot be null");
            }
            criteria.add(new SysUserTokenCriterion(condition, value));
        }

        protected void addCriterion(String condition, Object value,
                String property, int likeType) {
            if (value == null) {
                throw new RuntimeException("Value for " + property
                        + " cannot be null");
            }
            criteria.add(new SysUserTokenCriterion(condition, value, likeType));
        }

        protected void addCriterion(String condition, Object value1,
                Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property
                        + " cannot be null");
            }
            criteria.add(new SysUserTokenCriterion(condition, value1, value2));
        }

        public SysUserTokenCriteria andCriterionEqualTo(String criterion) {
            if (StringUtils.isBlank(criterion)) {
                criterion = "1=1";
            }
            addCriterion(criterion);
            return (SysUserTokenCriteria) this;
        }
        public SysUserTokenCriteria andIdIsNull() {
            addCriterion("ID is null");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andIdIsNotNull() {
            addCriterion("ID is not null");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andIdEqualTo(Integer value) {
            addCriterion("ID =", value, "ID");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andIdNotEqualTo(Integer value) {
            addCriterion("ID <>", value, "ID");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andIdGreaterThan(Integer value) {
            addCriterion("ID >", value, "ID");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("ID >=", value, "ID");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andIdLessThan(Integer value) {
            addCriterion("ID <", value, "ID");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andIdLessThanOrEqualTo(Integer value) {
            addCriterion("ID <=", value, "ID");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andIdLike(Integer value) {
            addCriterion("ID like ", value, "ID", 1);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andIdNotLike(Integer value) {
            addCriterion("ID  not like ", value, "ID", 1);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andIdLeftLike(Integer value) {
            addCriterion("ID like ", value, "ID", 0);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andIdNotLeftLike(Integer value) {
            addCriterion("ID  not like ", value, "ID", 0);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andIdRightLike(Integer value) {
            addCriterion("ID like ", value, "ID", 2);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andIdNotRightLike(Integer value) {
            addCriterion("ID  not like ", value, "ID", 2);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andIdIn(List<Integer> values) {
            addCriterion("ID  in ", values, "ID");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andIdNotIn(List<Integer> values) {
            addCriterion("ID not in ", values, "ID");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andIdBetween(Integer value1, Integer value2) {
            addCriterion("ID between ", value1, value2, "ID");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andIdNotBetween(Integer value1, Integer value2) {
            addCriterion("ID not between ", value1, value2, "ID");
            return (SysUserTokenCriteria) this;
        }
        public SysUserTokenCriteria andUserIdIsNull() {
            addCriterion("USER_ID is null");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andUserIdIsNotNull() {
            addCriterion("USER_ID is not null");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andUserIdEqualTo(Integer value) {
            addCriterion("USER_ID =", value, "USER_ID");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andUserIdNotEqualTo(Integer value) {
            addCriterion("USER_ID <>", value, "USER_ID");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andUserIdGreaterThan(Integer value) {
            addCriterion("USER_ID >", value, "USER_ID");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andUserIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("USER_ID >=", value, "USER_ID");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andUserIdLessThan(Integer value) {
            addCriterion("USER_ID <", value, "USER_ID");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andUserIdLessThanOrEqualTo(Integer value) {
            addCriterion("USER_ID <=", value, "USER_ID");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andUserIdLike(Integer value) {
            addCriterion("USER_ID like ", value, "USER_ID", 1);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andUserIdNotLike(Integer value) {
            addCriterion("USER_ID  not like ", value, "USER_ID", 1);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andUserIdLeftLike(Integer value) {
            addCriterion("USER_ID like ", value, "USER_ID", 0);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andUserIdNotLeftLike(Integer value) {
            addCriterion("USER_ID  not like ", value, "USER_ID", 0);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andUserIdRightLike(Integer value) {
            addCriterion("USER_ID like ", value, "USER_ID", 2);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andUserIdNotRightLike(Integer value) {
            addCriterion("USER_ID  not like ", value, "USER_ID", 2);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andUserIdIn(List<Integer> values) {
            addCriterion("USER_ID  in ", values, "USER_ID");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andUserIdNotIn(List<Integer> values) {
            addCriterion("USER_ID not in ", values, "USER_ID");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andUserIdBetween(Integer value1, Integer value2) {
            addCriterion("USER_ID between ", value1, value2, "USER_ID");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andUserIdNotBetween(Integer value1, Integer value2) {
            addCriterion("USER_ID not between ", value1, value2, "USER_ID");
            return (SysUserTokenCriteria) this;
        }
        public SysUserTokenCriteria andTokenIsNull() {
            addCriterion("TOKEN is null");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andTokenIsNotNull() {
            addCriterion("TOKEN is not null");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andTokenEqualTo(String value) {
            addCriterion("TOKEN =", value, "TOKEN");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andTokenNotEqualTo(String value) {
            addCriterion("TOKEN <>", value, "TOKEN");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andTokenGreaterThan(String value) {
            addCriterion("TOKEN >", value, "TOKEN");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andTokenGreaterThanOrEqualTo(String value) {
            addCriterion("TOKEN >=", value, "TOKEN");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andTokenLessThan(String value) {
            addCriterion("TOKEN <", value, "TOKEN");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andTokenLessThanOrEqualTo(String value) {
            addCriterion("TOKEN <=", value, "TOKEN");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andTokenLike(String value) {
            addCriterion("TOKEN like ", value, "TOKEN", 1);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andTokenNotLike(String value) {
            addCriterion("TOKEN  not like ", value, "TOKEN", 1);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andTokenLeftLike(String value) {
            addCriterion("TOKEN like ", value, "TOKEN", 0);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andTokenNotLeftLike(String value) {
            addCriterion("TOKEN  not like ", value, "TOKEN", 0);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andTokenRightLike(String value) {
            addCriterion("TOKEN like ", value, "TOKEN", 2);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andTokenNotRightLike(String value) {
            addCriterion("TOKEN  not like ", value, "TOKEN", 2);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andTokenIn(List<String> values) {
            addCriterion("TOKEN  in ", values, "TOKEN");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andTokenNotIn(List<String> values) {
            addCriterion("TOKEN not in ", values, "TOKEN");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andTokenBetween(String value1, String value2) {
            addCriterion("TOKEN between ", value1, value2, "TOKEN");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andTokenNotBetween(String value1, String value2) {
            addCriterion("TOKEN not between ", value1, value2, "TOKEN");
            return (SysUserTokenCriteria) this;
        }
        public SysUserTokenCriteria andCreateDateIsNull() {
            addCriterion("CREATE_DATE is null");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andCreateDateIsNotNull() {
            addCriterion("CREATE_DATE is not null");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andCreateDateEqualTo(Date value) {
            addCriterion("CREATE_DATE =", value, "CREATE_DATE");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andCreateDateNotEqualTo(Date value) {
            addCriterion("CREATE_DATE <>", value, "CREATE_DATE");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andCreateDateGreaterThan(Date value) {
            addCriterion("CREATE_DATE >", value, "CREATE_DATE");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andCreateDateGreaterThanOrEqualTo(Date value) {
            addCriterion("CREATE_DATE >=", value, "CREATE_DATE");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andCreateDateLessThan(Date value) {
            addCriterion("CREATE_DATE <", value, "CREATE_DATE");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andCreateDateLessThanOrEqualTo(Date value) {
            addCriterion("CREATE_DATE <=", value, "CREATE_DATE");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andCreateDateLike(Date value) {
            addCriterion("CREATE_DATE like ", value, "CREATE_DATE", 1);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andCreateDateNotLike(Date value) {
            addCriterion("CREATE_DATE  not like ", value, "CREATE_DATE", 1);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andCreateDateLeftLike(Date value) {
            addCriterion("CREATE_DATE like ", value, "CREATE_DATE", 0);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andCreateDateNotLeftLike(Date value) {
            addCriterion("CREATE_DATE  not like ", value, "CREATE_DATE", 0);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andCreateDateRightLike(Date value) {
            addCriterion("CREATE_DATE like ", value, "CREATE_DATE", 2);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andCreateDateNotRightLike(Date value) {
            addCriterion("CREATE_DATE  not like ", value, "CREATE_DATE", 2);
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andCreateDateIn(List<Date> values) {
            addCriterion("CREATE_DATE  in ", values, "CREATE_DATE");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andCreateDateNotIn(List<Date> values) {
            addCriterion("CREATE_DATE not in ", values, "CREATE_DATE");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andCreateDateBetween(Date value1, Date value2) {
            addCriterion("CREATE_DATE between ", value1, value2, "CREATE_DATE");
            return (SysUserTokenCriteria) this;
        }

        public SysUserTokenCriteria andCreateDateNotBetween(Date value1, Date value2) {
            addCriterion("CREATE_DATE not between ", value1, value2, "CREATE_DATE");
            return (SysUserTokenCriteria) this;
        }

    }

    public static class SysUserTokenCriteria extends GeneratedCriteria {

        protected SysUserTokenCriteria() {
            super();
        }
    }

    public static class SysUserTokenCriterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected SysUserTokenCriterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }
        protected SysUserTokenCriterion(String condition, Object value, int likeType) {
            this.condition = condition;
            if (likeType == 0) {
                this.value = "%" + value;
            }
            else if (likeType == 1) {
                this.value = "%" + value + "%";
            }
            else {
                this.value = value + "%";
            }
            this.typeHandler = null;
            this.singleValue = true;

        }

        protected SysUserTokenCriterion(String condition, Object value,
                String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            }
            else {
                this.singleValue = true;
            }
        }

        protected SysUserTokenCriterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected SysUserTokenCriterion(String condition, Object value,
                Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected SysUserTokenCriterion(String condition, Object value,
                Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}